home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Utilities / vim-5.1 / src / testdir / test4.in < prev    next >
Encoding:
Text File  |  1997-10-21  |  818 b   |  32 lines

  1. Test for autocommand that changes current buffer on BufEnter event.
  2. Check if modelines are interpreted for the correct buffer.
  3.  
  4. STARTTEST
  5. :set nocompatible
  6. :au BufEnter Xxx brew
  7. /start of
  8. :.,/end of/w! Xxx   " write test file Xxx
  9. :set ai modeline modelines=3
  10. :sp Xxx             " split to Xxx, autocmd will do :brew
  11. G?this is a
  12. othis should be auto-indented
  13. :                   " Append hello with autoindent to this file
  14. :au! BufEnter Xxx
  15. :buf Xxx            " go to Xxx, no autocmd anymore
  16. G?this is a
  17. othis should be in column 1:wq " append hello without autoindent to Xxx
  18. G:r Xxx             " include Xxx in the current file
  19. :?startstart?,$w! test.out
  20. :!rm Xxx
  21. :qa!
  22. ENDTEST
  23.  
  24. startstart
  25. start of test file Xxx
  26. vim: set noai :
  27.     this is a test
  28.     this is a test
  29.     this is a test
  30.     this is a test
  31. end of test file Xxx
  32.